{extend name="adminblue/base" /}
{block name="resources"/}
<script type="text/javascript" src="__STATIC__/My97DatePicker/WdatePicker.js"></script>
<style  type="text/css">
.modal-div{width:90%;margin:auto}
.modal-dl{overflow:hidden}
.modal-dl dt{line-height:33px;float:left;font-weight:400}
.modal-dl dd{float:left}
.modal-dl dd span{display:block;color:#de533c}
.btn.off{background-color:#e26f6f;color:#FFF}
.btn.sure{color:#FFF;background-color:#62c462}
.status-error{display:inline-block;padding-left:5px;padding-right:5px;padding-bottom:3px;padding-top:3px;color:#FFF;background-color:#de533c}
.status-success{display:inline-block;color:#FFF;padding-left:5px;padding-right:5px;padding-bottom:3px;padding-top:3px;background-color:#5be15b}
</style>

 {/block}
{block name="right_tab"}
<li><a class="nscs-table-handle_green" href="{:__URL('ADMIN_MAIN/account/applyshopaccountwithdraw')}"><i class="fa fa-plus-circle"></i>&nbsp;提现</a></li> 
{/block}
{block name="main"}
<table  class="table-class">
	<colgroup>
		<col style="width: 1%;">
		<col style="width: 5%;">
		<col style="width: 10%;">
		<col style="width: 10%;">
		<col style="width: 7%;">
		<col style="width: 11%;">
		<col style="width: 6%;">
		<col style="width: 10%;">
		<col style="width: 10%;">
		<col style="width: 6%;">
	<!-- 	<col style="width: 10%;"> -->
	</colgroup>
	<thead>
		<tr  align="center">
			<th><label style="margin-left: 5px;"> <input type="checkbox"  onclick="CheckAll(this)"></label></th>
			<th>提现流水号</th>
			<th>提现银行</th>
			<th>提现账户</th>
			<th>账户姓名</th>
			<th>手机</th>
			<th>金额</th>
			<th>提现日期</th>
			<th>到账日期</th>
			<th>状态</th>
		<!-- 	<th>操作</th> -->
		</tr>
	</thead>
	<colgroup>
		<col style="width: 3%;">
		<col style="width: 10%;">
		<col style="width: 9%;">
		<col style="width: 8%;">
		<col style="width: 9%;">
		<col style="width: 8%;">
		<col style="width: 6%;">
		<col style="width: 15%;">
		<col style="width: 15%;">
		<col style="width: 5%;">
	<!-- 	<col style="width: 10%;"> -->
	</colgroup>
	<tbody></tbody>
</table>




<!-- 修改用户上级（Modal）开始 -->
<div class="modal hide" id="editParent" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">推广员上级修改</h4>
            </div>
            <div class="modal-body">
            	<div class="modal-div">
            		<input type="hidden"  id="promoter_id"  value=''/>
            		<dl class="modal-dl">
            			<dt>上级推广员账号:</dt>
            			<dd>
            				<input  type="text" id="parent_promoter"value=""/>
            				<span id="ever_parent_promoter"></span>
            			</dd>
            		</dl>           		            		
            	</div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn off" data-dismiss="modal">关闭</button>
                <button type="button" class="btn sure" onclick="modifyPromoterParent();">修改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<!-- 修改用户上级（Modal）结束 -->
{/block}
{block name="script"}
{include file="adminblue/openDialog" /}
<script type="text/javascript">
//查询
function searchData(){
	LoadingInfo(1);
}
	//加载数据
	function LoadingInfo(pageIndex) {
		$.ajax({
			type : "post",
			url : "{:__URL('ADMIN_MAIN/account/shopaccountwithdrawlist')}",
			async : true,
			data : {
				"pageIndex" : pageIndex
			},
			success : function(data) {
			//	alert(JSON.stringify(data));
				$("#page_count").val(data['list']["page_count"]);
				$("#pageNumber a").remove();
				var html = '';
				if (data['list']["data"].length > 0) {
					for (var i = 0; i < data['list']["data"].length; i++) {
						var status = "";
						if(data['list']["data"][i]["status"] == 1){
							status = "已审核";
						}else if(data['list']["data"][i]["status"] == -1){
							status = "已拒绝";
						}else if(data["list"]["data"][i]["status"] == 2){
							status = "已结算";
						}else{
							status = "审核中";
						}
						var parent_realname ="";
						if(data['list']["data"][i]["parent_realname"] != null){
							parent_realname = data['list']["data"][i]["parent_realname"];
						}
						html += '<tr align="center">';
						html += '<td><div class="cell"><label ><input name="sub" type="checkbox" value="'+ data['list']["data"][i]["id"] +'" ></label></div></td>';
						html += '<td>' + data['list']["data"][i]["withdraw_no"] + '</td>';
						html += '<td>' + data['list']["data"][i]["bank_name"] + '</td>';
						html += '<td>' + data['list']["data"][i]["account_number"] + '</td>';
						html += '<td>' + data['list']["data"][i]["realname"] + '</td>';
						html += '<td>' + data['list']["data"][i]["mobile"] + '</td>';
						html += '<td>' + data['list']["data"][i]["cash"] + '</td>';
						html += '<td>' + timeStampTurnTime(data['list']["data"][i]["ask_for_date"]) + '</td>';
						if(data['list']["data"][i]["payment_date"] > 0){
							html += '<td> </td>';
						}else{
							html += '<td>' + timeStampTurnTime(data['list']["data"][i]["payment_date"]) + '</td>';
						}
						html += '<td>' + status + '</td>';						
						html += '</tr>';
					}
				} else {
					html += '<tr align="center"><th colspan="11">暂无符合条件的数据记录</th></tr>';
				}
				
				$(".style0list tbody").html(html);
				var totalpage = $("#page_count").val();
				if (totalpage == 1) {
					changeClass("all");
				}
				
				$(".table-class tbody").html(html);
				initPageData(data['list']["page_count"],data['list']['data'].length,data['list']['total_count']);
				$("#pageNumber").html(pagenumShow(jumpNumber,$("#page_count").val(),{$pageshow}));
				

			}
		});
	}	
	//全选
	function CheckAll(event){
		var checked = event.checked;
		$(".style0list tbody input[type = 'checkbox']").prop("checked",checked);
	}
	
	
	
</script>
{/block}